package com.bgIntlgn.client.entity.jishubu.papaerLibary;

import yuhuibear.poat.annotations.relation.Field;
import yuhuibear.poat.annotations.relation.Table;
import yuhuibear.poat.object.bean.Bean;

@Table(name = "pic_papers", constrain = "check (remain_copy <= total_copy)")
public class PicPaper implements Bean {

	/**
	 * 图纸id, 来自电子图档的图号。
	 */
	@Field(name = "id", type = "char(100)", constrain = "references papers(paper_id) not null")
	private String id;

	/**
	 * 图纸类型:{部件生产图，装配图}, [DictionaryType: 纸质图类型]
	 */
	@Field(name = "type", type = "int8", constrain = "not null references dictionarys(id) on update cascade ")
	private Long type;

	/**
	 * 图纸总页数
	 */
	@Field(name = "page_number", type = "int", constrain = "")
	private Integer pageNumber;

	/**
	 * 现有共的纸质图纸份数
	 */
	@Field(name = "total_copy", type = "int", constrain = "")
	private Integer totalCopy;

	/**
	 * 现存于库的纸质图纸份数
	 */
	@Field(name = "remain_copy", type = "int", constrain = "")
	private Integer remainCopy;

	/**
	 * 备注
	 */
	@Field(name = "comment", type = "varchar(250)", constrain = "")
	private String comment;

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public Long getType() {
		return this.type;
	}

	public void setType(Long type) {
		this.type = type;
	}

	public Integer getPageNumber() {
		return this.pageNumber;
	}

	public void setPageNumber(Integer pageNumber) {
		this.pageNumber = pageNumber;
	}

	public Integer getTotalCopy() {
		return this.totalCopy;
	}

	public void setTotalCopy(Integer totalCopy) {
		this.totalCopy = totalCopy;
	}

	public Integer getRemainCopy() {
		return this.remainCopy;
	}

	public void setRemainCopy(Integer remainCopy) {
		this.remainCopy = remainCopy;
	}

	public String getComment() {
		return this.comment;
	}

	public void setComment(String comment) {
		this.comment = comment;
	}

}
